package com.feilong.cn.mybatis.Auto;

/**
 * Created by yangxulong on 2018/4/2.
 */
public class AutoSqlSession {

    private AutoConfiguration configuration;
    private AutoExecutor executor;

    public AutoSqlSession(AutoConfiguration configuration, AutoExecutor executor) {
        this.configuration = configuration;
        this.executor = executor;
    }

    public <T> T GetMapper(Class clazz) {
        return (T) this.configuration.getMapper(clazz,this);
    }

    public <T> T SelectOne(String stateMent) {
        return this.executor.query(stateMent);
    }

}
